﻿@using EraNet.Core;
@using EraNet.Core.Model.Test;
@using EraNet.Core.Model.Drivings;
@using EraNet.Core.Model.Account;
@using EraNet.Core.Model.Messages;
@using EraNet.Common;
@{
    Layout = null;
    var school = (DrivingSchool)ViewBag.schoolaccount;
    //公告
    var nt = (IPagedList<Notices>)ViewBag.notice;
}

<div class="column width2" style="display:inline">
<div id="rightmenu">
<header>
<h3>账户信息</h3>
</header>
<dl class="first">
<dt><img width="16" height="16" alt="" SRC="@Url.Content("~/Styles/img/key.png")"></dt>
<dd><a href="#">驾校名称：</a></dd>
<dd class="last">@school.DrivingNames</dd>
<dt><img width="16" height="16" alt="" SRC="@Url.Content("~/Styles/img/key.png")"></dt>
<dd><a href="#">联系电话</a></dd>
<dd class="last">@school.Telephone</dd>
</dl>
</div>
<div class="content-box">
<div>
<h3>最新公告</h3>
</div>
<table>
@foreach (var n1 in nt)
{
    <tr>
        <td width="150px"><a href="/Messages/NoticesInfo?noticeId=@n1.Id">@(Utility.GetSubString(n1.ShortTitle, 15, "..."))</a></td>
        <td style="text-align:right">@n1.CreateDate.ToString("yyyy-MM-dd")</td>
    </tr>
}
@if (nt.Count > 0)
{
<tr>
    <td colspan="2" align="right" ><a href="/Messages/Notices">更多</a></td>
</tr>
}
else
{
    for (int i = 0; i <= 5; i++)
    {
         <tr>
              <td>&nbsp;</td>
        </tr>
    } 
}
</table>
</div>
</div>
